#include <crt_util.h>

_pid_t get_processid(void)
{
    _pid_t p;
#if (TARGET_OS == OS_WIN)
    p = GetCurrentProcessId();
#elif (TARGET_OS == OS_POSIX)
    p = getpid();
#elif (TARGET_OS == OS_MACH)
    p = getpid();
#elif (TARGET_OS == OS_UNIX)
    p = getpid();
#endif
    return p;
}
_pid_instance get_instance(void)
{
    _pid_instance p;
#if (TARGET_OS == OS_WIN)
    p = GetModuleHandle(0);
#elif (TARGET_OS == OS_POSIX)
    p = getpid();
#elif (TARGET_OS == OS_MACH)
    p = getpid();
#elif (TARGET_OS == OS_UNIX)
    p = getpid();
#endif
    return p;
}
